const Router = require('koa-router')

const authRouter = new Router()

const {
  login,
  success
} = require('../controller/auth_controller')

const{
  verifyLogin,
  verifyAuth
} = require('../middleware/auth_middleware')

authRouter.post('/login', verifyLogin, login)

// 用户某一请求
authRouter.get('/test', verifyAuth, success)

module.exports = authRouter